{"ast":null,"code":"// ================== Collapse Motion ==================\nvar getCollapsedHeight = function getCollapsedHeight() {\n  return {\n    height: 0,\n    opacity: 0\n  };\n};\nvar getRealHeight = function getRealHeight(node) {\n  var scrollHeight = node.scrollHeight;\n  return {\n    height: scrollHeight,\n    opacity: 1\n  };\n};\nvar getCurrentHeight = function getCurrentHeight(node) {\n  return {\n    height: node ? node.offsetHeight : 0\n  };\n};\nvar skipOpacityTransition = function skipOpacityTransition(_, event) {\n  return (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';\n};\nvar initCollapseMotion = function initCollapseMotion() {\n  var rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ant';\n  return {\n    motionName: \"\".concat(rootCls, \"-motion-collapse\"),\n    onAppearStart: getCollapsedHeight,\n    onEnterStart: getCollapsedHeight,\n    onAppearActive: getRealHeight,\n    onEnterActive: getRealHeight,\n    onLeaveStart: getCurrentHeight,\n    onLeaveActive: getCollapsedHeight,\n    onAppearEnd: skipOpacityTransition,\n    onEnterEnd: skipOpacityTransition,\n    onLeaveEnd: skipOpacityTransition,\n    motionDeadline: 500\n  };\n};\nvar SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];\nvar getTransitionDirection = function getTransitionDirection(placement) {\n  if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {\n    return \"slide-down\";\n  }\n  return \"slide-up\";\n};\nvar getTransitionName = function getTransitionName(rootPrefixCls, motion, transitionName) {\n  if (transitionName !== undefined) {\n    return transitionName;\n  }\n  return \"\".concat(rootPrefixCls, \"-\").concat(motion);\n};\nexport { getTransitionName, getTransitionDirection };\nexport default initCollapseMotion;","map":{"version":3,"names":["getCollapsedHeight","height","opacity","getRealHeight","node","scrollHeight","getCurrentHeight","offsetHeight","skipOpacityTransition","_","event","deadline","propertyName","initCollapseMotion","rootCls","arguments","length","undefined","motionName","onAppearStart","onEnterStart","onAppearActive","onEnterActive","onLeaveStart","onLeaveActive","onAppearEnd","onEnterEnd","onLeaveEnd","motionDeadline","SelectPlacements","getTransitionDirection","placement","getTransitionName","rootPrefixCls","motion","transitionName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/_util/motion.js"],"sourcesContent":["// ================== Collapse Motion ==================\nconst getCollapsedHeight = () => ({\n  height: 0,\n  opacity: 0\n});\nconst getRealHeight = node => {\n  const {\n    scrollHeight\n  } = node;\n  return {\n    height: scrollHeight,\n    opacity: 1\n  };\n};\nconst getCurrentHeight = node => ({\n  height: node ? node.offsetHeight : 0\n});\nconst skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';\nconst initCollapseMotion = function () {\n  let rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ant';\n  return {\n    motionName: `${rootCls}-motion-collapse`,\n    onAppearStart: getCollapsedHeight,\n    onEnterStart: getCollapsedHeight,\n    onAppearActive: getRealHeight,\n    onEnterActive: getRealHeight,\n    onLeaveStart: getCurrentHeight,\n    onLeaveActive: getCollapsedHeight,\n    onAppearEnd: skipOpacityTransition,\n    onEnterEnd: skipOpacityTransition,\n    onLeaveEnd: skipOpacityTransition,\n    motionDeadline: 500\n  };\n};\nconst SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];\nconst getTransitionDirection = placement => {\n  if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {\n    return `slide-down`;\n  }\n  return `slide-up`;\n};\nconst getTransitionName = (rootPrefixCls, motion, transitionName) => {\n  if (transitionName !== undefined) {\n    return transitionName;\n  }\n  return `${rootPrefixCls}-${motion}`;\n};\nexport { getTransitionName, getTransitionDirection };\nexport default initCollapseMotion;"],"mappings":"AAAA;AACA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkB;EAAA,OAAU;IAChCC,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE;EACX,CAAC;AAAA,CAAC;AACF,IAAMC,aAAa,GAAG,SAAhBA,aAAa,CAA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